# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lorcon-old
pkgver=1.0825ec0
pkgrel=1
epoch=1
pkgdesc='Create what libradiate could have been: A generic library for injecting 802.11 frames, capable of injection via multiple driver frameworks, without forcing modification of the application code, old API version.'
url='http://802.11ninja.net/lorcon/'
arch=('x86_64' 'aarch64')
license=('GPL')
depends=('libnl' 'libpcap')
makedepends=('git')
provides=('lorcon=199')
source=("git+https://github.com/dhalperi/lorcon-old.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./configure --prefix=/usr --mandir=/usr/share/man

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  mv "$pkgdir/usr/share/man/man3"/{lorcon.3,lorcon-old.3}
}

